package top.stmo.stmoBlog.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import top.stmo.stmoBlog.dao.vo.CommentVo;
import top.stmo.stmoBlog.service.CommentService;

import java.util.List;


@Controller
public class CommentController {

    @Autowired
    private CommentService commentService;

    @GetMapping("message")
    public String message(Model model) {
        List<CommentVo> messageVoList = commentService.findAllMessage();
        model.addAttribute("messageVoList",messageVoList);
        return "message";
    }

}
